home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / mus / misc / xmodule30.lha / XModule / Install_XModule < prev    next >
Text File  |  1995-01-02  |  7KB  |  293 lines

  1. ; $VER: Install_XModule 2.8 (5.5.94)
  2. ;
  3. ; Installer script for XModule
  4.  
  5. ;***************************************************************************
  6. ; English strings
  7. ;***************************************************************************
  8.  
  9. (set default_lang 1)
  10.  
  11. (set #askdirstr        (cat "In which directory should XModule be installed?\n"
  12.                     "(A drawer called \"XModule\" will be created)"))
  13.  
  14. (set #askdir-help    (cat "Please select the directory or partition in which you would like "
  15.                     "XModule installed (a drawer named \"XModule\" will be created "
  16.                     "in the directory you have selected).\n\n\n"
  17.                     @askdir-help))
  18.  
  19. (set #askdocformat    "Please select which documentation format(s) to install:")
  20.  
  21. (set #magicwb-str    (cat "Do you want MagicWB-style icons for XModule?\n"
  22.                     "(Requires MagicWB installed in your system)\n\n"
  23.                     "MagicWB is a collection of fine 8 color icons made by "
  24.                     "Martin Huttenloher.  These icons require a special palette, "
  25.                     "otherwise they look awful.\n"))
  26.  
  27. (set #magicwb-help    "Answer \"Yes\" only if your system preferences are properly set.")
  28.  
  29. (set #docformat-help (cat "Choose AmigaGuide documentation if you are running "
  30.                     "WorkBench 2.1 or higher and/or you have Commodore AmigaGuide "
  31.                     "hypertext reader installed.  Otherwhise choose the normal "
  32.                     "documentation.\n\n"
  33.                     @askoptions-help))
  34.  
  35. (set #toolman-brush (cat "This distribution includes a brush image suitable for ToolManager docks.\n\n"
  36.                     "Do you want to copy it to your brush drawer?"))
  37.  
  38. (set #toolman-help    (cat "ToolManager is a program by Stefan Backer which extends Workbench "
  39.                     "usability allowing the user to start applications through AppIcons, AppMenus and "
  40.                     "small windows filled with buttons called docks.\n\n"
  41.                     "If you answer \"Yes\", you will be asked in which directory the brush image "
  42.                     "should be copied.\n\n"))
  43.  
  44. (set #toolman-askdir "In which directory should the ToolManager image be copied?")
  45.  
  46.  
  47. (set #bad-kick        "Sorry, XModule requires Kickstart version 2.04 or higher.")
  48.  
  49. (set #makingdir            "Creating XModule directory...")
  50. (set #copying-xmodule    "Copying XModule...")
  51. (set #copying-doc        "Copying ASCII Documentation...")
  52. (set #copying-guide        "Copying AmigaGuide Documentation...")
  53. (set #copying-brush        "Copying ToolManager image...")
  54.  
  55. (set #bonusmod-str        (cat "XModule distribution contains a fine bonus module "
  56.                         "made by FBY (Fabio Barzagli).\n\n"
  57.                         "Do you want it copied to your modules drawer?"))
  58.  
  59. (set #makingmoddir        "Creating Modules Directory...")
  60. (set #copying-mods        "Copying Bonus Modules...")
  61.  
  62.  
  63. ;***************************************************************************
  64. ; Make sure we are running under a 2.04 ROM
  65. ;***************************************************************************
  66.  
  67. (set sys-ver (/ (getversion) 65536))
  68.  
  69. (if (< sys-ver 37)
  70.     (abort #bad-kick)
  71. )
  72.  
  73.  
  74. (welcome) ; Say Hi!
  75.  
  76.  
  77. ;***************************************************************************
  78. ; Ask user where he wants the XModule files
  79. ;***************************************************************************
  80.  
  81. (set @target-dir
  82.     (askdir
  83.         (prompt #askdirstr)
  84.         (help #targetsel #askdir-help)
  85.         (default @default-dest)
  86.     )
  87. )
  88.  
  89. (set @target-dir (tackon @target-dir "XModule"))
  90. (set @default-dest @target-dir)
  91.  
  92. ;***************************************************************************
  93. ; Make the XModule directory
  94. ;***************************************************************************
  95.  
  96. (makedir
  97.     @target-dir
  98.     (infos)
  99.     (help @makedir-help)
  100.     (prompt #makingdir)
  101. )
  102.  
  103.  
  104. ;***************************************************************************
  105. ; Ask for MagicWB icons
  106. ;***************************************************************************
  107.  
  108. (if (askbool
  109.         (prompt #magicwb-str)
  110.         (help #magicwb-help)
  111.     )
  112.  
  113.     (set @magic-icons 1)
  114. )
  115.  
  116.  
  117. ;***************************************************************************
  118. ; Copy the XModule executable and its icon
  119. ;***************************************************************************
  120.  
  121. (copyfiles
  122.     (prompt #copying-xmodule)
  123.     (source "XModule")
  124.     (dest @target-dir)
  125.     (infos)
  126. )
  127.  
  128. (if (= @magic-icons 1)
  129.     (copyfiles
  130.         (source "MagicWB_Icons/XModule.info")
  131.         (dest @target-dir)
  132.     )
  133. )
  134.  
  135. (complete 20)
  136.  
  137. ;***************************************************************************
  138. ; Copy default icon for modules & instruments
  139. ;***************************************************************************
  140.  
  141. (if (= @magic-icons 1)
  142.     (
  143.         (copyfiles
  144.             (source "MagicWB_Icons/")
  145.             (choices "def_Module.info" "def_Instrument.info")
  146.             (dest @target-dir)
  147.         )
  148.     )
  149.  
  150.     ( ; else
  151.         (copyfiles
  152.             (source "")
  153.             (choices "def_Module.info" "def_Instrument.info")
  154.             (dest @target-dir)
  155.         )
  156.     )
  157. )
  158.  
  159. (tooltype
  160.     (dest (tackon @target-dir "def_Module"))
  161.     (setdefaulttool (tackon @target-dir "XModule"))
  162.     (noposition)
  163. )
  164.  
  165.  
  166.  
  167. ;***************************************************************************
  168. ; Copy documentation files
  169. ;***************************************************************************
  170.  
  171. (complete 50)
  172.  
  173. (set doc-choice (askoptions
  174.     (prompt #askdocformat)
  175.     (help #docformat-help)
  176.  
  177.     (choices
  178.         "AmigaGuide Documentation"
  179.         "ASCII Documentation"
  180.     )
  181.     (default (if (OR (exists "SYS:Utilities/AmigaGuide") (exists "SYS:Utilities/MultiView")) 1 2))
  182. ))
  183.  
  184. (if (BITAND doc-choice 1)
  185. (
  186.     (copyfiles
  187.         (prompt #copying-guide)
  188.         (source "XModule.guide")
  189.         (dest @target-dir)
  190.         (infos)
  191.     )
  192.  
  193.     (if (= @magic-icons 1)
  194.         (copyfiles
  195.             (source "MagicWB_Icons/XModule.guide.info")
  196.             (prompt #copying-xmodule)
  197.             (dest @target-dir)
  198.         )
  199.     )
  200.  
  201.     (if (< sys-ver 39)
  202.         (tooltype
  203.             (dest (tackon @target-dir "XModule.guide"))
  204.             (setdefaulttool "SYS:Utlities/AmigaGuide")
  205.         )
  206.     )
  207. ))
  208.  
  209. (if (BITAND doc-choice 2)
  210. (
  211.     (copyfiles
  212.         (prompt #copying-doc)
  213.         (source "XModule.doc")
  214.         (dest @target-dir)
  215.         (infos)
  216.     )
  217.  
  218.     (if (= @magic-icons 1)
  219.         (copyfiles
  220.             (source "MagicWB_Icons/XModule.doc.info")
  221.             (prompt #copying-xmodule)
  222.             (dest @target-dir)
  223.         )
  224.     )
  225. ))
  226.  
  227.  
  228. (complete 70)
  229.  
  230.  
  231. ;***************************************************************************
  232. ; Copy ToolManager brush
  233. ;***************************************************************************
  234.  
  235. (if (= @magic-icons 1)
  236.     (if (askbool
  237.             (prompt #toolman-brush)
  238.             (help #toolman-help))
  239.         (
  240.             (set @brush-dir
  241.                 (askdir
  242.                     (prompt #toolman-askdir)
  243.                     (help #askdir-help)
  244.                     (default "SYS:Prefs/")
  245.                 )
  246.             )
  247.  
  248.             (copyfiles
  249.                 (source "MagicWB_Icons/XModule.brush")
  250.                 (prompt #copying-brush)
  251.                 (dest @brush-dir)
  252.             )
  253.         )
  254.     )
  255. )
  256.  
  257. (complete 80)
  258.  
  259.  
  260. ;***************************************************************************
  261. ; Copy bonus module
  262. ;***************************************************************************
  263.  
  264. (if (askbool (prompt #bonusmod-str) (help @askbool-help))
  265.     (
  266.         (makedir
  267.             (tackon @target-dir "Modules")
  268.             (infos)
  269.             (prompt #makingmoddir)
  270.             (help @makedir-help)
  271.         )
  272.  
  273.         (copyfiles
  274.             (prompt #copying-mods)
  275.             (source "BonusModules")
  276.             (dest (tackon @target-dir "Modules"))
  277.             (all)
  278.             (infos)
  279.         )
  280.  
  281.         (if (= @magic-icons 1)
  282.             (copyfiles
  283.                 (source "MagicWB_Icons/def_Module.info")
  284.                 (prompt #copying-mods)
  285.                 (dest (tackon @target-dir "Modules"))
  286.                 (newname "FBY-Winning.mod.info")
  287.             )
  288.         )
  289.     )
  290. )
  291.  
  292. (complete 100)
  293.